﻿Public class Workflow1
    Inherits SequentialWorkflowActivity

    Private Sub codeActivity1_ExecuteCode(ByVal sender As System.Object, ByVal e As System.EventArgs)
        newCustomer = New CustomerServices.Customer
        newCustomer.FirstName = "Bob"
        newCustomer.LastName = "Jones"
        newCustomer.Email = "bob@random.com"
        newCustomer.Phone = "+61 011 011 100"
    End Sub
    Private Sub codeActivity2_ExecuteCode(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Console.WriteLine("New Customer created with Id '" & NewCustomerId.ToString & "'")
    End Sub

    Public Shared newCustomerProperty As System.Workflow.ComponentModel.DependencyProperty = DependencyProperty.Register("newCustomer", GetType(ManagementWorkflow.CustomerServices.Customer), GetType(ManagementWorkflow.Workflow1))

    <System.ComponentModel.DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)> _
        <System.ComponentModel.BrowsableAttribute(True)> _
            <System.ComponentModel.CategoryAttribute("Parameters")> _
                Public Property newCustomer() As ManagementWorkflow.CustomerServices.Customer
        Get
            Return CType(MyBase.GetValue(ManagementWorkflow.Workflow1.newCustomerProperty), ManagementWorkflow.CustomerServices.Customer)

        End Get
        Set(ByVal value As ManagementWorkflow.CustomerServices.Customer)
            MyBase.SetValue(ManagementWorkflow.Workflow1.newCustomerProperty, value)

        End Set
    End Property
    Public Shared NewCustomerIdProperty As System.Workflow.ComponentModel.DependencyProperty = DependencyProperty.Register("NewCustomerId", GetType(System.Guid), GetType(ManagementWorkflow.Workflow1))

    <System.ComponentModel.DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)> _
        <System.ComponentModel.BrowsableAttribute(True)> _
            <System.ComponentModel.CategoryAttribute("Parameters")> _
                Public Property NewCustomerId() As System.Guid
        Get
            Return CType(MyBase.GetValue(ManagementWorkflow.Workflow1.NewCustomerIdProperty), System.Guid)

        End Get
        Set(ByVal value As System.Guid)
            MyBase.SetValue(ManagementWorkflow.Workflow1.NewCustomerIdProperty, value)

        End Set
    End Property


End Class
